<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'if.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <form action="if.jsp" method="post">
      <input type="text" name="score" value="${param.score }">
      <input type="submit">
    </form>
    
    <c:if test="${param.score > 100 }">
       <c:out value="输入错误"></c:out>
    </c:if>
    <!-- 优秀 score >= 90 -->
    <c:if test="${param.score >= 90 && param.score < 100}" var="result">
       <c:out value="恭喜！你的成绩是优秀"></c:out><br>
    </c:if>
    <c:if test="${param.score >= 80 && param.score < 90}">
       <c:out value="您的成绩良好"></c:out>
    </c:if>
    <c:if test="${param.score >= 70 && param.score < 80}">
       <c:out value="您的成绩中等"></c:out>
    </c:if>
    <c:if test="${param.score >= 60 && param.score < 70}">
       <c:out value="您的成绩及格"></c:out>
    </c:if>
    <c:if test="${param.score < 60 }">
       <c:out value="您的成绩不及格"></c:out>
    </c:if>
    <c:out value="${result}"></c:out>
  </body>
</html>
